new Vue({
    el: "#wap_intro",
    data() {
        return {
            services: services,
            intro:'',
            resumeId:''
        }
    },
    created () {
        this.resumeId = $.cookie('resumeId');
        var storage=window.localStorage;
        this.intro = storage.my_intro;
    },
    methods:{
        alterIntro:function () {
            var that = this;
            $.ajax({
                url:that.services+"/user/resume"
                ,type:"post"
                ,contentType:"application/json;charset=utf-8"
                ,xhrFields: {
                    withCredentials: true
                }
                ,crossDomain: true
                ,data:JSON.stringify({
                    "id": that.resumeId,
                    "profile": that.intro,
                })
                ,success:function(res){
                    console.log(res);
                    var check = ApiLoginStatus(res);
                    if(check==false)
                        return false;
                    if(res.success){
                        $.cookie('my_intro', '', { expires: -1 });
                        layerMsg(res.message);
                        setTimeout(function() {
                            window.location.href="my-resume.html" ;
                        },500);
                    }
                }
            });
        }
    }
});